package com.unitd.frame.comm.tree;

import com.unitd.frame.comm.bean.BaseBean;

import java.util.ArrayList;
import java.util.List;

/**
 * @desc 此类用于定义JS zTree对应的数据结构的顶级对象,需要实现JS zTree的实体类需要集成此类,同时,也是为了前端使用layerUI组件的菜单组件实现配套
 * @filename Menu.java
 * @version 1.0
 * @copyright www.unitd.com
 * @author Hudan
 * @date 2017/5/19
 */
@SuppressWarnings("serial")
public class Menu extends BaseBean {

	/** 菜单标题 */
	private String title;
	/** 菜单图标 */
	private String icon;
	/** 菜单URL */
	private String href;
	/** 级联菜单,是否展开,默认不展开 */
	private boolean spread;
	/** 子菜单 */
	private List<Menu> children = new ArrayList<>();

	public Menu() {
	}

	public Menu(String title, String icon, String href) {
		super();
		this.title = title;
		this.icon = icon;
		this.href = href;
	}

	public Menu(String title, String icon, boolean spread) {
		super();
		this.title = title;
		this.icon = icon;
		this.spread = spread;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getHref() {
		return href;
	}

	public void setHref(String href) {
		this.href = href;
	}

	public boolean isSpread() {
		return spread;
	}

	public void setSpread(boolean spread) {
		this.spread = spread;
	}

	public List<Menu> getChildren() {
		return children;
	}

	public void setChildren(List<Menu> children) {
		this.children = children;
	}
}